//
//  SCBNetTool.h
//  Time
//
//  Created by dllo on 16/7/13.
//  Copyright © 2016年 司昌宝. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^successBlock)(id result);
typedef void(^failureBlock)(NSError *error);

typedef NS_ENUM(NSUInteger, SCBResponseStyle) {
    SCBJSON,
    SCBDATA,
    SCBXML,
};

typedef NS_ENUM(NSUInteger, SCBResquestStyle) {
    SCBBodyString,
    SCBBodyJSON,
};

@interface SCBNetTool : NSObject

+ (void)GET:(NSString *)url
   withBody:(id)body withHeaderFile:(NSDictionary *)headers
withResponse:(SCBResponseStyle)responseStyle
withSuccess:(successBlock)success
withFaolure:(failureBlock)failure;


+ (void)POST:(NSString *)url
    withBody:(id)body withBodyStyle:(SCBResquestStyle)bodyStyle
withHeaderFile:(NSDictionary *)headers
withResponse:(SCBResponseStyle)responseStyle
withSuccess:(successBlock)success
withFaolure:(failureBlock)failure;

@end
